1. Field of the Invention
The present invention relates to a control device for controlling the amplitude of a swinging body such as a cradle.
2. Description of the Related Art
From the outset an infant chair having an infant sitting therein can be moved, however, in recent years, an infant chair functionable as a cradle has been provided for practical use.
A drive system of the infant chair is composed of a drive solenoid incorporated in the infant chair, a photodiode for detecting the center of swing, or the like.
FIG. 1 is a block diagram showing an example of the configuration of a swing control device in a conventional infant chair driving system.
As shown in FIG. 1, a swing control device 1 has a cradle 2, a photo sensor 3, a timer 4, and a solenoid drive circuit 5.
In the swing control device 1, the cradle 2 carrying an infant swings and, for example, when it passes a center of the swing, the center of the swing is detected by the photodiode 3, whereby a detecting signal S3 is output to the timer 4.
Upon inputting the detecting signal S3 to the timer 4, a fixed drive pulse S4 determined by a not illustrated set volume is generated and output to the drive circuit 5.
The drive circuit 5 receives the drive pulse S4 and drives an end portion of the cradle (push or pull) with a driving force determined in advance, whereby the cradle 2 is swung.
However, in the above described conventional swing control device 1, the weight of an infant being carried, in other words, despite the way the cradle 2 swings differently in response to the load it carries, because the solenoid is driven by the fixed drive pulse S4 based on the detecting signal S3 of the built-in photodiode 3 which indicates that it has detected the center of the swing, the width of the swing is changed by the weight of the infant in the cradle 2. Thus there is a disadvantage in that control of the swing cannot be carried out as expected.
Also, since the solenoid is driven by the fixed drive pulse S4, there is a disadvantage in that only a monotonous swing can be realized.
An object of the present invention is to provide a swing control device of a swinging body capable of accurately controlling the drive thereof in response to the load the swinging body carries even if it carries infants of different weights, and realizing a desired swing.
To achieve the above objects, according to an aspect of the present invention, there is provided a swing control device of a swinging body that swings in a direction opposite each other centering on a predetermined axis, comprising a driving means for driving the swinging body with a driving power corresponding to a supplied drive pulse, a sensor portion for detecting a swing width of the swinging body, and a controlling means for obtaining a pulse width for driving the swinging body at the next timing on the basis of the swing width detected by the sensor portion and an expected value of a swing set in advance to generate the drive pulse and supplying the drive pulse to the driving means.
Preferably, the sensor portion comprises a plurality of optical transmission mark rows in which a plurality of optical transmission marks transmitting irradiated light in a predetermined direction are arranged with predetermined intervals in the swing direction of the swinging body and the optical transmission marks of each row are arranged to be shifted at a predetermined pitch, and a plurality of optical sensors which irradiate light to each of the rows of optical transmission marks and receives the light transmitted by the optical transmission marks to output pulse signals in response to the received light level, and the controlling means obtains sensor data based on the pulse signals output by the plurality of optical sensors, decodes data patterns set in advance which corresponds to a combination of the sensor data, judges a swing direction from a changed pattern of the continuous data pattern, compares a target value set in advance with at least a present and previous drive value to obtain a pulse width for driving at the next timing, and outputs a drive pulse of the obtained pulse width to the driving means so that driving can be performed in accordance with an expected value of the swing set in advance.
Preferably, the sensor portion comprises a first optical transmission mark row in which a plurality of optical transmission marks transmitting irradiated light in a predetermined direction are arranged with predetermined intervals in the swing direction of the swinging body, a second optical transmission mark row arranged in parallel with respect to the first optical transmission mark row and in which a plurality of optical transmission marks are arranged with predetermined intervals in the swing direction and the optical transmission marks are arranged to be shifted at a predetermined pitch with respect to those of the first optical transmission mark row, a first optical sensor which irradiates light to the first optical transmission mark row and receives the light transmitted by the optical transmission marks to output a first pulse signal in response to the received light level, and a second optical sensor which irradiates light to the second optical transmission mark row and receives the light transmitted by the optical transmission marks to output a second pulse signal in response to the received light level, and the controlling means obtains sensor data based on the first and second pulse signals, decodes data patterns set in advance which corresponds to a combination of the first and second sensor data, judges a swing direction from a changed pattern of the continuous data pattern, reads a target value from a table set in advance to compare with a present drive value and at least a previous drive value to obtain a pulse width for driving at the next timing, and outputs a drive pulse of the obtained pulse width to the driving means so that driving can be performed in accordance with an expected value of the swing set in advance.
Preferably, the target value and drive value comprise a pulse count number.
Preferably, the controlling means sets a pulse width with the addition of a 1/f fluctuation.
According to the present invention, when a swinging body swings, a plurality of pulse signals with the phases thereof shifted are generated in the sensor portion and output to the controlling means.
At the controlling means, sensor data are obtained based on the pulse signals by the plurality of optical sensors, and data patterns, which are set in advance, corresponding to the combination of sensor data are decoded.
The direction of the swing is then judged by the changed pattern of the continuous data pattern. Further, a target value set in advance is compared with at least a previous drive value and the present drive value to obtain a pulse width for driving at the next timing so that driving is performed in accordance with an expected value of the swing set in advance. The drive pulse of the obtained pulse width is output to the driving means.
Due to this, accurate driving control in response to the load becomes possible even if it carries infants having different weights, whereby high precision swinging is realized.